<%@ page import="java.util.List" %>
<%@ page import="Model.Student" %><%--
  Created by IntelliJ IDEA.
  User: 86182
  Date: 2024/8/1
  Time: 10:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        /* Border styles */
        #table-4 thead, #table-4 tr {
            border-top-width: 1px;
            border-top-style: solid;
            border-top-color: rgb(211, 202, 221);
        }
        #table-4 {
            border-bottom-width: 1px;
            border-bottom-style: solid;
            border-bottom-color: rgb(211, 202, 221);
        }

        /* Padding and font style */
        #table-4 td, #table-4 th {
            padding: 5px 10px;
            font-size: 12px;
            font-family: Verdana;
            color: rgb(95, 74, 121);
        }

        /* Alternating background colors */
        #table-4 tr:nth-child(even) {
            background: rgb(223, 216, 232)
        }
        #table-4 tr:nth-child(odd) {
            background: #FFF
        }
    </style>
</head>
<body>

 <%
     List<Student> list = (List<Student>) request.getAttribute("list");
 %>
 <div class="#table-4 tr:nth-child(ood)">
<h1 style="text-align: center">学生信息展示</h1>

 <table id="table-4" cellpadding='3' cellspacing='0' border='1' align='center'>
     <tr id="table-4 tr">
         <th id="table-4 th">学号</th>
         <th>姓名</th>
         <th>性别</th>
         <th>年龄</th>
         <th >专业</th>
         <th >时间</th>
         <th>操作1</th>
         <th>操作2</th>
     </tr>
     <%
         for (int i = 0; i < list.size(); i++) {
     %>
     <tr>
     <td id="table-4 td"><%=list.get(i).getId()%></td>
     <td ><%=list.get(i).getName()%></td>
     <td><%=list.get(i).getSex()%></td>
     <td><%=list.get(i).getAge()%></td>
     <td><%=list.get(i).getMajor()%></td>
     <td><%=list.get(i).getTime()%></td>
     <td>删除</td>
     <td>更新</td>
     </tr>
<%
         }
%>
 </table>
 </div>
</body>
</html>
